module.exports = {
    lintOnSave: false, //取消Eslint代码规范警告
    css: { // 预先处理css 
        loaderOptions: { // 加载器 处理样式 
            css: {},
            postcss: { // 样式代码处理 
                plugins: [ // 插件 
                    require("postcss-px2rem")({ // px => rem  
                        remUnit: 37.5, // VantUI 设计稿尺寸 375 
                        exclude: /node_modules/i // 不包含 
                    })
                ]
            }
        }
    },
    pwa: {
        iconPaths: {
            favicon32: 'favicon.ico',
            favicon16: 'favicon.ico',
            appleTouchIcon: 'favicon.ico',
            maskIcon: 'favicon.ico',
            msTileImage: 'favicon.ico'
        }
    },
    devServer: {
        hot: true,
        proxy: {
            '/bili': {
                target: 'https://mall.bilibili.com/',
                changeOrigin: true,
                secure: true,
                pathRewrite: {
                    '^/bili': ''
                }
            },
            '/oppo': {
                target: 'https://www.opposhop.cn/',
                changeOrigin: true,
                secure: true,
                pathRewrite: {
                    '^/oppo': ''
                }
            },
            '/shouban': {
                target: 'https://www.biligo.com/',
                changeOrigin: true,
                secure: true,
                pathRewrite: {
                    '^/shouban': ''
                }
            },
            '/move': {
                target: 'https://show.bilibili.com/',
                changeOrigin: true,
                secure: true,
                pathRewrite: {
                    '^/move': ''
                }
            },
            '/localhost': {
                target: 'http://localhost:5555',
                changeOrigin: true,
                secure: true,
                pathRewrite: {
                    '^/localhost': ''
                }
            }
        }
    }
}